import 'package:flutter/material.dart';

class wrapGesture extends StatefulWidget {
  final Function function;
  final Widget child;

  const wrapGesture({Key key, this.function, this.child}) : super(key: key);
  @override
  _wrapGestureState createState() => _wrapGestureState();
}

class _wrapGestureState extends State<wrapGesture> {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
    onTap:widget.function?? (){print("点击了");},
    child: widget.child,
  );
  }
}
